# $Id: PKGBUILD 215666 2014-06-30 06:45:08Z tpowa $
# Maintainer: Tom K <tomk@runbox.com>

pkgname=gnu-netcat
pkgver=0.7.1
pkgrel=1
pkgdesc="GNU rewrite of netcat, the network piping application"
depends=('info')
makedepends=('texinfo')
arch=('i686' 'x86_64')
url="http://netcat.sourceforge.net/"
license=('GPL')
replaces=('netcat')
provides=('netcat')
install=gnu-netcat.install
source=("http://downloads.sourceforge.net/sourceforge/netcat/netcat-$pkgver.tar.bz2"
        gnu-netcat-0.7.1-msys2.patch)
md5sums=('0a29eff1736ddb5effd0b1ec1f6fe0ef'
         '8af211320d66c886b12247b6bd8da845')

prepare() {
  cd "${srcdir}/netcat-${pkgver}"
  patch -p1 -i "${srcdir}/gnu-netcat-0.7.1-msys2.patch"

  autoreconf -fiv
}

build() {
  cd "${srcdir}/netcat-${pkgver}"
  ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
  make
}

package() {
  cd "${srcdir}/netcat-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
